"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.err = exports.info = void 0;
const express_1 = require("express");
function zjj(req, res, next) {
    Object.defineProperty(express_1.response, "info", {
        configurable: true,
        enumerable: true,
        writable: true,
        value: function (status = 0, msg = "ok", data = null) {
            express_1.response.send({
                status,
                msg,
                data,
            });
        },
    });
    next();
    return;
}
exports.default = zjj;
function info(res, msg, data = null) {
    res.status(200).send({
        status: 0,
        msg,
        data,
    });
    return;
}
exports.info = info;
function err(res, msg, data = null, status = 1) {
    res.send({
        status,
        msg,
        data,
    });
}
exports.err = err;
